<template>
  <app-view>
    <van-nav-bar left-text="获取验证码" left-arrow :border="false" @click-left="onClickLeft" />
    <scroll-view>
      <recover-password @success="onSuccess" />
    </scroll-view>
  </app-view>
</template>

<script>
  import ScrollView from '@components/scroll-view/index';
  import RecoverPassword from '@views/login/components/recover-password';

  export default {
    components: { ScrollView, RecoverPassword },
    methods: {
      // 后退点击
      onClickLeft() {
        this.$router.push('../user');
      },
      onSuccess(query) {
        this.$router.push({
          path: './reset-password',
          query
        });
      }
    }
  };
</script>
